package com.hubu.tree;

public class SibTreeTool {
    public SibTree.Node<String> buildTree(){
        SibTree.Node<String> root=new SibTree.Node<>("A",null,null);
        SibTree.Node<String> node1=new SibTree.Node<>("B",null,null);
        SibTree.Node<String> node2=new SibTree.Node<>("C",null,null);
        SibTree.Node<String> node3=new SibTree.Node<>("D",null,null);
        SibTree.Node<String> node4=new SibTree.Node<>("E",null,null);
        SibTree.Node<String> node5=new SibTree.Node<>("F",null,null);
        SibTree.Node<String> node6=new SibTree.Node<>("G",null,null);
        SibTree.Node<String> node7=new SibTree.Node<>("N",null,null);
        node6.sub=node7;
        node5.sub=node6;
        node4.sub=node5;
        node3.sub=node4;
        node2.sub=node3;
        node1.sub=node2;
        root.child=node1;

        SibTree.Node<String> node8=new SibTree.Node<>("H",null,null);
        SibTree.Node<String> node9=new SibTree.Node<>("I",null,null);
        SibTree.Node<String> node10=new SibTree.Node<>("J",null,null);
        SibTree.Node<String> node11=new SibTree.Node<>("K",null,null);
        SibTree.Node<String> node12=new SibTree.Node<>("L",null,null);
        SibTree.Node<String> node13=new SibTree.Node<>("M",null,null);
        SibTree.Node<String> node14=new SibTree.Node<>("P",null,null);
        SibTree.Node<String> node15=new SibTree.Node<>("Q",null,null);

        node3.child=node8;

        node4.child=node9;

        node9.sub=node10;

        node10.child=node14;

        node14.sub=node15;

        node5.child=node11;

        node11.sub=node12;
        node12.sub=node13;

        return root;
    }
}
